package com.yundasys.lab16springbootplus.lab16springbootplus.conditional;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @PACKAGE_NAME: com.yundasys.lab16springbootplus.lab16springbootplus.conditional
 * @NAME: ConditionalOnPropertyConfig01
 * @USER: jiangta
 * @DATE: 2022/9/22
 * @TIME: 10:21 上午
 * @PROJECT_NAME: springboot-labs
 */

@Configuration
@ConditionalOnProperty(name = "my.love.pangdun",  havingValue="true")
public class ConditionalOnPropertyConfig01 {

    @Bean
    public String getAccount() {
        System.out.println("@@@@ XiaMi love PangDun @@@");
        return "XXXX";
    }

}
